<?php

///Get left and right theme image, build img tag and write to html
///params: $positon: 0 for left, 1 for right
///return: void
function get_image($position, $atl,$width,$height)
{
    echo GetLogo(4,$position,$atl,$width,$height);
}

function build_paragraph($str){
    echo "<p style=\"text-align:justify\">".$str."</p>";
}
///Read content from DB and display to html
///params: none
///return: void
function read_content()
{
    $query = "Select * from content WHERE page_id = '4' AND flag='1' AND is_deleted = '0'";
    
    $db_item = GetFirstItemFromDB($query);
    if($db_item == 0) {
        echo "No menu available";
    } else {
        $raw_menu = $db_item['info'];
        $array_menu = explode(".-", $raw_menu);
        $count = count($array_menu);
        for ($i=0; $i < $count; $i++)
        {
            echo build_paragraph($array_menu[$i]);
        }
    }
}
?>
